﻿
/*
NAILSUPERSTORE ® COMPANY
 
[HISTORY]
Created By  	: NGUYEN VAN TY
Created Date	: 12/17/2010
Modified By     :
Modified Date   :
Note            :

*/

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using CommonTagTime.DataAccess;
using CommonTagTime.ModelObject;
namespace CommonTagTime.Business
{
    public class busTipNews
    {
        //------------------------------------------------
        //FIELD TABLE
        //------------------------------------------------
        public const string TABLE = "TipNews";
        public const string TIPNEWSID = "TipNewsID";
        public const string SORTORDER = "SortOrder";
        public const string ISACTIVE = "IsActive";
        public const string TYPE = "Type";
        public const string TITLE = "Title";
        public const string TITLEEN = "TitleEn";
        public const string SHORTDESCRIPTION = "ShortDescription";
        public const string DESCRIPTION = "Description";
        public const string SHORTDESCRIPTIONEN = "ShortDescriptionEn";
        public const string DESCRIPTIONEN = "DescriptionEn";
        public const string THUMBIMAGE = "ThumbImage";    
        public const string CREATEDBY = "CreatedBy";
        public const string CREATEDDATE = "CreatedDate";
        public const string UPDATEDBY = "UpdatedBy";
        public const string UPDATEDDATE = "UpdatedDate";       
        public const string ORDERBY = "OrderBy";
        public const string ORDERDIRECTION = "OrderDirection";
        public const string CURRENTPAGE = "CurrentPage";
        public const string PAGESIZE = "PageSize";     
        public const string TOTALRECORDS = "TotalRecords";
        public const string CONDITION = "Condition";
        public const string PageTitle = "PageTitle";
        public const string MetaKeywords = "MetaKeywords";
        public const string MetaDescription = "MetaDescription";
      

        private daoTipNews _daoTipNews;
        //------------------------------------------------
        //PUBLIC
        //------------------------------------------------
        public busTipNews()
        {
            _daoTipNews = new daoTipNews();
        }
        public bool Insert(TipNews objTipNews)
        {
            if (objTipNews == null)
                return false;
            return _daoTipNews.Insert(objTipNews);
        }
        public bool Update(TipNews objTipNews)
        {
            if (objTipNews == null)
                return false;
            return _daoTipNews.Update(objTipNews);
        }
        public bool InsertEn(TipNews objTipNews)
        {
            if (objTipNews == null)
                return false;
            return _daoTipNews.InsertEn(objTipNews);
        }
        public bool UpdateEn(TipNews objTipNews)
        {
            if (objTipNews == null)
                return false;
            return _daoTipNews.UpdateEn(objTipNews);
        }

        public bool Active(int tipNewsID)
        {
            if (tipNewsID<=0)
                return false;
            return _daoTipNews.Active(tipNewsID);
        }
        public bool DeActive(int tipNewsID)
        {
            if (tipNewsID <= 0)
                return false;
            return _daoTipNews.DeActive(tipNewsID);
        }
        public bool OrderDown(int tipNewsID)
        {
            if (tipNewsID <= 0)
                return false;
            return _daoTipNews.OrderDown(tipNewsID);
        }
        public bool OrderUp(int tipNewsID)
        {
            if (tipNewsID <= 0)
                return false;
            return _daoTipNews.OrderUp(tipNewsID);
        }

        public bool Delete(int tipNewsID)
        {
            if (tipNewsID <= 0)
                return false;
            return _daoTipNews.Delete(tipNewsID);
        }
        public TipNews GetByID(int _TipID)
        {
            if (_TipID <= 0)
                return null;
            return _daoTipNews.GetByID(_TipID);
        }
        public TipNews GetEnByID(int _TipID)
        {
            if (_TipID <= 0)
                return null;
            return _daoTipNews.GetEnByID(_TipID);
        }
        public TipNewsCollection List(TipNews objTipNews)
        {
            return _daoTipNews.List(objTipNews);
        }

        public TipNewsCollection ListEn(TipNews objTipNews)
        {
            return _daoTipNews.ListEn(objTipNews);
        }
    }

}
